
public class Main
{

	public static void main(String[] args)
	{
		int arg;
		for (int i = 1; i < args.length; i += 2)
		{
			try
			{
				arg = Integer.parseInt(args[i]);
				Liczba l = new Liczba(args[i - 1], arg);
				System.out.println(args[i - 1] + " [" + arg + "]:");
				for (int j = 2; j < 17; ++j)
				{
					System.out.print(l.zapis(j) + "[" + j + "], ");
				}
				System.out.println();
			}
			catch (NumberFormatException e)
			{
				System.out.println(args[i] + " nie jest liczba calkowita");
			}
			catch (LiczbaException e)
			{
				System.out.println(e.getMessage());
			}
		}
	}

}
